﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microhard.Protal.Interfaces;
using Microhard.Core;

namespace Microhard.WebUI.Controllers
{
    public class HomeController : Controller
    {
        /// <summary>
        /// 首页
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(Guid companyID)
        {
            ViewData["CompanyID"] = companyID;
            return View();
        }

        /// <summary>
        /// 产品
        /// </summary>
        /// <param name="prdID"></param>
        /// <returns></returns>
        public ActionResult Product(Guid prdID)
        {
            IProduct prd = IoC.Resolve<IProduct>();
            var prdModel = prd.GetModelByID(prdID);
            return View(prdModel);
        }

        /// <summary>
        /// 协议
        /// </summary>
        /// <returns></returns>
        public ActionResult Agreement(string argType)
        {
            ViewData["AgreementType"] = argType;
            return View();
        }

        /// <summary>
        /// 关于
        /// </summary>
        /// <returns></returns>
        public ActionResult AboutUs()
        {
            return View();
        }

    }
}
